/**
 * Created with SublimeText3 
 * @Author:      Chenweihan
 * @DateTime:    2018-06-01 13:48:42
 * @Description: Description
 */
import language from '@/i18n/zh';

const validatorRule = {
    //登陆用户
    user: [
        { required: true, message: '请输入用户名.', trigger: 'blur' },
        { type: 'string', pattern:  /^[a-zA-Z0-9_]{4-15}$/, message: '用户名不合法！匹配字母数字下划线，长度位4-15', trigger: 'blur' }
    ],
    //登陆密码
    password: [
        { required: true, message: '请输入密码.', trigger: 'blur' },
        { type: 'string', pattern: /^[a-zA-Z0-9_]{1-15}$/, message: '密码输入不合法！长度1-15', trigger: 'blur' }
    ],
    //商户简称
    merchantAbbreviation: [
        { required: true, message: '请输入商户简称.', trigger: 'blur' },
        { type: 'string', pattern: /^[a-zA-Z0-9_]{1-15}$/, message: '商户简称输入不合法！长度1-15', trigger: 'blur' }
    ],
    //负责人姓名
    principalName: [
        { required: true, message: '请输入负责人姓名.', trigger: 'blur' },
        { type: 'string', pattern: /^[a-zA-Z0-9_]{1-15}$/, message: '负责人输入不合法！长度1-15', trigger: 'blur' }
    ],
    //身份证正面
    iDCardF: [
        { required: true, message: '请上传身份证正面照片', maxSize: 2048 , fileFormat: ['jpg','jpeg','png']}
    ],
    //身份证反面
    iDCardB: [
        { required: true, message: '请上传身份证背面照片', maxSize: 2048 , fileFormat: ['jpg','jpeg','png']}
    ],


};

export default validatorRule;